<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
</head>
<body>
  <script>
   const arr=[12,34,56,78,100,23,120,0,12,-1]
   Array.prototype.max=function(){
         return Math.max(...this)
   }
   Array.prototype.min=function(){
        return Math.min(...arr)
   }
   console.log(arr.max())
   console.log(arr.min());
  </script>
</body>
</html>